<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class Role extends Model
{
    //
    //此模型关联的数据表
    protected $table = 'roles';
    //    表的主键
    public $primaryKey = 'id';
    //不更新created_at  updated_at字段
    public $timestamps = false;
    public $guarded = [];

    public function permissons()
    {
        return $this->belongsToMany('App\Http\Model\Permission','permission_role','role_id','permission_id');
    }

}
